import { IPaginationQuery } from './common.type';

/**
 * 字典实体（响应）
 */
export interface IDict {
  id: string;
  code: string;
  name: string;
  status: number;
  description?: string | null;
  createdAt?: string | null;
  updatedAt?: string | null;
}

/**
 * 字典数据实体（响应）
 */
export interface IDictData {
  id: string;
  label: string;
  value: string;
  dictId: string;
  status: number;
  sort: number;
  description?: string | null;
  isDefault: boolean;
  createdAt?: string | null;
  updatedAt?: string | null;
}

/**
 * 创建字典请求
 */
export interface ICreateDict {
  code: string;
  name: string;
  status?: number;
  description?: string;
}

/**
 * 创建字典数据请求
 */
export interface ICreateDictData {
  label: string;
  value: string;
  dictId: string;
  status?: number;
  sort?: number;
  description?: string;
  isDefault?: boolean;
}

/**
 * 更新字典请求
 */
export interface IUpdateDict {
  code?: string;
  name?: string;
  status?: number;
  description?: string;
}

/**
 * 更新字典数据请求
 */
export interface IUpdateDictData {
  label?: string;
  value?: string;
  status?: number;
  sort?: number;
  description?: string;
  isDefault?: boolean;
}

/**
 * 查询字典请求
 */
export interface IQueryDict extends IPaginationQuery {
  code?: string;
  name?: string;
  status?: number;
}

/**
 * 查询字典数据请求
 */
export interface IQueryDictData extends IPaginationQuery {
  dictId?: string;
  label?: string;
  value?: string;
  status?: number;
}
